#ifndef _SYS_EXT_H
#define _SYS_EXT_H
#include "os_obj.h"
#include "bsp.h"

#define  cpu_data_sync()               __DSB()
#define  cpu_instruct_sync()           __ISB()

__STATIC_INLINE void wfi_set(void)
{
	__WFI();		  
}

#define intx_alloc()   TX_INTERRUPT_SAVE_AREA

//关闭所有中断(但是不包括fault和NMI中断)
#define intx_disable()   TX_DISABLE  

//开启所有中断
#define intx_enable()    TX_RESTORE              

void os_lock(void);
void os_unlock(void);
void nvic_irq_set(IRQn_Type IRQn, uint32_t priority, uint8_t newst);

#define intx_opt_alloc()

#endif

